# -*- coding: utf-8 -*-
#apply_thread_update.py
#register thread update requests and return OK if accepted

import wsgiref.handlers
from google.appengine.ext import webapp
import sys, time, uuid
import os
from google.appengine.ext.webapp import template
from google.appengine.ext import db
from xmw import tianya
import xmw
from xmw import error

class MainPage(xmw.RequestHandler):
    def get(self):
        lst_post=tianya.Post.all()
        for post in lst_post:
            post.delete()

    

def main():
    import global_setting
    
    application = webapp.WSGIApplication(
                                       [('/portal/clear_post', MainPage)],
                                       debug=global_setting.is_debug())                                       
    wsgiref.handlers.CGIHandler().run(application)

if __name__ == "__main__":
    main()

